package cn.tedu.csmall520.business.controller;

import cn.tedu.csmall520.business.service.IBusinessService;
import cn.tedu.csmall520.commons.restful.JsonResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/base/business")
@Api(tags = "业务触发模块")
public class BusinessController {

    @Autowired
    private IBusinessService businessService;

    @PostMapping("/buy")
    @ApiOperation("执行购买业务的触发")
    public JsonResult<Void> buy() {
        businessService.buy();
        return JsonResult.ok("已触发购买业务");

    }

}
